package com.design.strategy;

/**
 * @Author: ChengLei.Liu
 * @Date: 2020-07-23 15:36
 * @Description:
 */
public class GoOnWorkByWeather implements GoOnWorkStrategy {
    @Override
    public void goOnWork(GoOnWork goOnWork) {
        System.out.println("根据季节去上班策略");
        System.out.println("现在的季节:"+goOnWork.getWeather());
        if(goOnWork.getWeather().equals("春天")){
            System.out.println("走路上班");
        }else{
            System.out.println("开车去上班");
        }
    }
}
